package com.cosmoplat.xikai.business.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.cosmoplat.xikai.common.annotation.Excel;
import com.cosmoplat.xikai.common.core.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

@ApiModel(value = "故障信息配置", description = "用于表示系统中的故障信息配置")
@Data
public class FaultConfiguration implements Serializable {
    @TableId(value = "id", type = IdType.AUTO)
    @Excel(name = "序号")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @ApiModelProperty(value = "故障代码", example = "DV256")
    @Excel(name = "故障代码")
    private String faultCode;
    @ApiModelProperty(value = "故障参数名", example = "风机报警")
    @Excel(name = "故障参数名", readConverterExp = "0=mechanicalArmRelated,1=motor1,2=motor2,3=motor3,4=motor4,5=motor5,6=motor6,7=motor7,8=motor8,9=motor9,10=motor10,11=motor11,12=motor12,13=motor13,14=visionSystemRelated,15=otherRelated,16=insufficientOilSupplySystem1,17=insufficientOilSupplySystem2,18=insufficientOilSupplySystem3", combo = "mechanicalArmRelated,motor1,motor2,motor3,motor4,motor5,motor6,motor7,motor8,motor9,motor10,motor11,motor12,motor13,visionSystemRelated,otherRelated,insufficientOilSupplySystem1,insufficientOilSupplySystem2,insufficientOilSupplySystem3")
    private String faultName;
    @ApiModelProperty(value = "故障描述", example = "没加油")
    @Excel(name = "故障描述")
    private String faultDescription;
    @ApiModelProperty(value = "故障标识", example = "0:否1:是")
    @Excel(name = "故障标识", readConverterExp = "0=否,1=是", combo = "否,是")
    private Integer faultIdentification;
    @ApiModelProperty(value = "创建时间", example = "2025-01-01 00:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date faultCreateTime;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date faultUpdateTime;
    @Excel(name = "备注")
    private String notes;

}
